package com.superpai.request.item;

import java.util.TreeMap;

import com.superpai.common.Constants;
import com.superpai.request.PaiPaiRequest;
import com.superpai.response.item.GetItemResponse;
import com.superpai.utils.ParameterUtils;

/**
 * @author Devin.Hu
 * @date 2011-9-9
 * @version V1.0
 * @description 
 */
public class GetItemRequest implements PaiPaiRequest<GetItemResponse> {

	/** 商家编码 **/
	private String itemCode;
	/** 商家编码 **/
	private String itemLocalCode;
	/** 是否需要解析商品属性 **/
	private int needParseAttr;
	/** 是否需要返回商品详情 **/
	private int needDetailInfo;
	/** 是否需要返回附加信息 **/
	private int needExtendInfo;
	
	
	public String getItemCode() {
		return itemCode;
	}

	public void setItemCode(String itemCode) {
		this.itemCode = itemCode;
	}

	public String getItemLocalCode() {
		return itemLocalCode;
	}

	public void setItemLocalCode(String itemLocalCode) {
		this.itemLocalCode = itemLocalCode;
	}

	public int getNeedParseAttr() {
		return needParseAttr;
	}

	public void setNeedParseAttr(int needParseAttr) {
		this.needParseAttr = needParseAttr;
	}

	public int getNeedDetailInfo() {
		return needDetailInfo;
	}

	public void setNeedDetailInfo(int needDetailInfo) {
		this.needDetailInfo = needDetailInfo;
	}

	public int getNeedExtendInfo() {
		return needExtendInfo;
	}

	public void setNeedExtendInfo(int needExtendInfo) {
		this.needExtendInfo = needExtendInfo;
	}

	@Override
	public String getApiMethodName() {
		return Constants.item_getItem_method;
	}

	@Override
	public TreeMap<String, String> getTextParams(ParameterUtils paramUtils) throws Exception {
		paramUtils.addStringParam("itemCode", itemCode);
		paramUtils.addStringParam("itemLocalCode", itemLocalCode);
		paramUtils.addStringParam("needParseAttr", needParseAttr);
		paramUtils.addStringParam("needDetailInfo", needDetailInfo);
		paramUtils.addStringParam("needExtendInfo", needExtendInfo);
		return paramUtils.getParamsMap();
	}

	@Override
	public Class<GetItemResponse> getResponseClass() {
		return GetItemResponse.class;
	}

	
	
}
